package com.sjk.pojo;
import java.io.Serializable;

/**
 * @author lohhhha
 * 2023/5/20
 */

public class LoginReturnInfo implements Serializable {
    private String jwt;
    private String username;
    private String gender;
    private int age;
    private String name;
    private String birthdate;
    private String phonenum;
    private String id;
    private String address;
    private int limit;

    public String getJwt() {
        return jwt;
    }

    public void setJwt(String jwt) {
        this.jwt = jwt;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getBirthdate() {
        return birthdate;
    }

    public void setBirthdate(String birthdate) {
        this.birthdate = birthdate;
    }

    public String getPhonenum() {
        return phonenum;
    }

    public void setPhonenum(String phonenum) {
        this.phonenum = phonenum;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public int getLimit() {
        return limit;
    }

    public void setLimit(int limit) {
        this.limit = limit;
    }

    public LoginReturnInfo(User u, String jwt) {
        this.jwt = jwt;
        this.limit = u.getAuthority();
        this.username = u.getUsername();
        this.gender = u.getGender();
        this.age = u.getAge();
        this.name = u.getName();
        this.birthdate = u.getBirthdate();
        this.phonenum = u.getPhonenum();
        this.id = u.getId();
        this.address = u.getAddress();
    }
}
